$(function(){
	$(".ke_inline").each(function(i){
		window["imgs"+i] = [];
		window["total"+i] = 0;
		$(this).children("img").each(function(){
			var img = this;
			$("<img/>").attr("src", $(img).attr("src")).load(function(){
				window["total"+i] += this.width;
				img.real_width = this.width;
			});
			window["imgs"+i].push(img);
		});
	});
})

$(window).load(function(){
	for(var i=0;i<$(".ke_inline").length;i++){
		for(var j=0;j<window["imgs"+i].length;j++){
			$(window["imgs"+i][j]).css("width",((window["imgs"+i][j].real_width*100)/window["total"+i])+"%");
		}
	}
});
